package cn.kinoko.config;

import cn.kinoko.interceptors.RTInterceptor;
import cn.kinoko.interceptors.TokenInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;


/**
 * @author kinoko
 */
@EnableWebMvc
@Configuration
public class WebMvcConfig extends BaseWebMvcConfig {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new RTInterceptor()).addPathPatterns("/**");
        registry.addInterceptor(new TokenInterceptor()).addPathPatterns("/**");
    }
}
